Oasis Club

E-cards
if ($_POST) {
foreach ($_POST as $var => $value) {
$_POST[$var] = stripslashes($value);
}
}
if ($_POST["state"] == "send") {
include($conf_includes_dir."include.php");
include($conf_includes_dir."mailer/file_put_contents.php");
include($conf_includes_dir."mailer/htmlMimeMail.php");
$html = show_ecard();
$text = strip_tags($html);
/*
* DISABLED FOR RMI
*
$from = "\"".$_POST["from_first"]." ".$_POST["from_last"]."\" <".$_POST["from_email"].">";
$to = "\"".$_POST["to_first"]." ".$_POST["to_last"]."\" <".$_POST["to_email"].">";
*/
$from = $_POST["from_email"];
$to = $_POST["to_email"];
$mail = new htmlMimeMail();
$mail->setHtml($html, $text, $conf_modules_dir."cards/");
$mail->setFrom($from);
$mail->setSubject($conf_ecards_subject);
$result = $mail->send(array($to));
//Send mail to site owners with information from this ECard
process_emails("marketing@petcheyleisure.com");
$mail_result = ($result) ? "E-card successfully sent!" : "There was some kind of problem sending your E-card.
Please verify the data or contact the webmaster."; echo "
Recipient's email is invalid.\n"; } if ($ecards_error) { edit($ecards_error); } else { ?>
3. Below is the e-card you created.
echo show_ecard(); ?>
}
}
else if ($_GET["card"] || $_POST["state"] == "edit") {
edit();
}
else {
show_ecards();
}
function edit($ecards_error="") {
global $conf_modules_dir,$_GET,$_POST;
?>
2. Below is your e-card selection.
" width="400" height="190">
Please verify the data or contact the webmaster."; echo "
$mail_result
"; echo show_ecard(); ?> } else if ($_POST["state"] == "confirm") { if (valid_email($_POST["from_email"]) == false) { $ecards_error="Sender's email is invalid.\n"; } if (valid_email($_POST["to_email"]) == false) { $ecards_error.="Recipient's email is invalid.\n"; } if ($ecards_error) { edit($ecards_error); } else { ?>
3. Below is the e-card you created.
To send it now, scroll down and click the "Send" button.
echo show_ecard(); ?>
}
}
else if ($_GET["card"] || $_POST["state"] == "edit") {
edit();
}
else {
show_ecards();
}
function edit($ecards_error="") {
global $conf_modules_dir,$_GET,$_POST;
?>
2. Below is your e-card selection.
Scroll down to write, address, and build this e-card.
echo $ecards_error ?>
} function show_ecards() { ?>








